<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:util="http://java.sun.com/jsf/composite/util">
	
	<!-- Dialogo Filtrar Aprovações -->
	<p:dialog appendToBody="true" closable="true" header="#{i18n.DialogoFiltrarClientePortal_Header}"
		modal="false" widgetVar="dialogoFiltrarClientePortal" width="540" resizable="false">
		<h:form id="formFiltrarClientePortal">
			<div class="dialogo_container_18">
				<util:dialogoLabel value="#{i18n.DialogoFiltrarClientePortal_Nome}" />
				<div class="dialogo_grid_18">
					<p:inputText value="#{aprovacaoClientePortalBean.varNome}" styleClass="dialogo_width_18"/>
				</div>
				
				<util:dialogoLabel value="#{i18n.DialogoFiltrarClientePortal_UsuarioResponsavel}" />
				<div class="dialogo_grid_18">
					<p:inputText value="#{aprovacaoClientePortalBean.varUsuario}" styleClass="dialogo_width_18"/>
				</div>
				
				<util:dialogoLabel grid="9" value="#{i18n.DialogoFiltrarClientePortal_DataCadastroDe}" />
				<util:dialogoLabel grid="9" value="#{i18n.DialogoFiltrarClientePortal_DataCadastroAte}" />
				<div class="dialogo_grid_9">
					<p:calendar id="calendar1" value="#{aprovacaoClientePortalBean.varCadastroDe}"
						navigator="true" pattern="dd/mm/yyyy"/>
				</div>
				<div class="dialogo_grid_9">
					<p:calendar id="calendar2" value="#{aprovacaoClientePortalBean.varCadastroAte}" 
						navigator="true" pattern="dd/mm/yyyy"/>
				</div>
				
				<util:hr />
				<div class="dialogo_grid_18">
					<p:commandButton onclick="dialogoFiltrarClientePortal.hide()" type="button" 
						value="#{i18n.btn_Cancelar}" style="float:right"/>
					<p:commandButton action="#{aprovacaoClientePortalBean.filtrarAprovacaoClientePortal}" update="@form, :formPrincipal" 
						value="#{i18n.btn_Filtrar}" style="float:right" onstart="spinner.show()" oncomplete="spinner.hide();dialogoFiltrarClientePortal.hide()"/>
					<p:commandButton action="#{aprovacaoClientePortalBean.filtrarTodosAprovacaoClientePortal}" update="@form, :formPrincipal" 
						value="#{i18n.btn_Todos}" style="float:right" onstart="spinner.show()" oncomplete="spinner.hide();dialogoFiltrarClientePortal.hide()"/>
				</div>
			</div>	
		</h:form>
	</p:dialog>
	
	<!-- Dialogo Detalhar Cliente Portal -->
	<p:dialog appendToBody="true" closable="true" header="#{i18n.DialogoDetalharClientePortal_Header}"
		modal="false" widgetVar="dialogoDetalharClientePortal" width="540" resizable="false">
		<h:form id="formDetalharClientePortal">
			<div class="dialogo_container_18">
				<util:dialogoLabel value="#{i18n.DialogoDetalharClientePortal_NomeCompleto}" />
				<div class="dialogo_grid_18">
					<p:inputText value="#{aprovacaoClientePortalBean.clientePortalInstance.nomeCompleto}" styleClass="dialogo_width_18" disabled="true"/>
				</div>
				
				<util:dialogoLabel grid="9" value="#{i18n.DialogoDetalharClientePortal_NomeCurto}" />
				<util:dialogoLabel grid="9" value="#{i18n.DialogoDetalharClientePortal_DataCadastro}" />
				<div class="dialogo_grid_9">
					<p:inputText value="#{aprovacaoClientePortalBean.clientePortalInstance.nomeCurto}" styleClass="dialogo_width_8" disabled="true"/>
				</div>
				<div class="dialogo_grid_9">
					<p:inputText value="#{aprovacaoClientePortalBean.clientePortalInstance.dataCadastro}" styleClass="dialogo_width_9" disabled="true">
						<f:convertDateTime pattern="dd 'de' MMMM 'de' yyyy 'ás' HH:mm" />
					</p:inputText>
				</div>
				
				<util:dialogoLabel value="#{i18n.DialogoDetalharClientePortal_UsuarioResponsavel}" />
				<div class="dialogo_grid_18">
					<p:inputText value="#{aprovacaoClientePortalBean.clientePortalInstance.responsavel.nomeCompleto}" styleClass="dialogo_width_18" disabled="true"/>
				</div>
				
				<util:dialogoLabel value="#{i18n.DialogoDetalharClientePortal_EmailUsuarioResponsavel}" />
				<div class="dialogo_grid_18">
					<p:inputText value="#{aprovacaoClientePortalBean.clientePortalInstance.responsavel.email}" styleClass="dialogo_width_18" disabled="true"/>
				</div>
				<util:hr />
				<div class="dialogo_grid_18">
					<p:commandButton onclick="dialogoDetalharClientePortal.hide()" type="button" 
						value="#{i18n.btn_Fechar}" style="float:right"/>
					<p:commandButton onclick="dialogoConfirmarAprovacao.show()" 
						icon="ui-icon ui-icon-check" value="#{i18n.btn_Aprovar}"/>
				</div>
			</div>	
		</h:form>
	</p:dialog>
	
	<p:dialog appendToBody="true" closable="true" header="#{i18n.DialogoConfirmarAprovacaoCliente_Header}"
		modal="false" widgetVar="dialogoConfirmarAprovacao" width="450" resizable="false">
		<h:form id="formConfirmarAprovacao">
			<div class="dialog_container_16">
 				<div class="dialog_grid_16 div-label" style="margin-top: 7px; margin-bottom: 7px;">
 					<center>
 						<h:outputText value="#{aprovacaoClientePortalBean.msgAprovacao}" />
 					</center>
				</div>
				<div class="dialog_grid_16 divHr">
					<hr></hr>
				</div>
				<div class="dialog_grid_16 right">
					<p:commandButton value="#{i18n.btn_Confirmar}" update="@form, :formPrincipal" onstart="spinner.show();"
						action="#{aprovacaoClientePortalBean.aprovarCliente}" oncomplete="spinner.hide();dialogoConfirmarAprovacao.hide();dialogoDetalharClientePortal.hide();" />
					<p:commandButton value="#{i18n.btn_Cancelar}" type="button" onclick="dialogoConfirmarAprovacao.hide();" />
				</div>
			</div>
		</h:form>
	</p:dialog>
</f:view>